#!/usr/bin/bash
#
# Put customizations to your image in this file.

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
GITLAB_VERSION=12.8.7

# Exit if any commands fail
set -o errexit

# Configuring image specific packages
echo "* Configuring image specific packages.";
cd /root/
/usr/bin/wget --no-check-certificate -c -O gitlab-ce-${GITLAB_VERSION}-ce.0.el7.x86_64.rpm https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-${GITLAB_VERSION}-ce.0.el7.x86_64.rpm
rpm -i gitlab-ce-${GITLAB_VERSION}-ce.0.el7.x86_64.rpm

echo "* Ensure bootstrap will run next time"
rm -rf /var/lib/bootstrap || true

# Clean up
echo "* Cleaning up."
rm -rf /root/*
history -c
